﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AssetsSys.Model;

namespace AssetsSys.model
{
    /// <summary>
    /// 资产表
    /// </summary>
    public class Assets: BaseEntity
    {
        /// <summary>
        /// 资产编号
        /// </summary>
        public string AssetsNum { get; set; }
        /// <summary>
        /// 资产名称
        /// </summary>
        public string AssetsName { get; set; }
        /// <summary>
        /// 资产描述
        /// </summary>
        public string AssetsDescribe { get; set; }
        /// <summary>
        /// 资产价值
        /// </summary>
        public decimal Decimal { get; set; }
        /// <summary>
        /// 资产类型
        /// </summary>
        [ForeignKey(nameof(Type))]
        public Guid TypeId { get; set; }
        public Type Type { get; set; }
        /// <summary>
        /// 资产来源
        /// </summary>
        [ForeignKey(nameof(Source))]
        public Guid SourceId { get; set; }
        public Source Source { get; set; }
        /// <summary>
        /// 资产状况
        /// </summary>
        [ForeignKey(nameof(Status))]
        public Guid StatusId { get; set; }
        public Status Status { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>
        [ForeignKey(nameof(PrincipalUser))]
        public Guid PrincipalId { get; set; }
        public User PrincipalUser { get; set; }
        /// <summary>
        /// 入库人
        /// </summary>
        [ForeignKey(nameof(StorageUser))]
        public Guid StorageId { get; set; }
        public User StorageUser { get; set; }


    }
}
